package com.e3.web.core.server;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class HttpSessionHelper {
	
	public static void setAttribute(HttpServletRequest request,String attrName,Object value){
		HttpSession session = request.getSession();
		session.removeAttribute(attrName);
		session.setAttribute(attrName, value);
	}
	
	public static Object getAttribute(HttpServletRequest request,String attrName){
		HttpSession session = request.getSession();
		return session.getAttribute(attrName);
	}
	
	public static void removeAttribute(HttpServletRequest request,String attrName){
		HttpSession session = request.getSession();
		session.removeAttribute(attrName);
	}
}
